package com.xbh.dms.utils;

import com.jfinal.core.Controller;
import com.jfinal.kit.StrKit;

/**
 * @GetControllerToken: 获取controller的token
 * @author: ZBoHang
 * @time: 2021/8/5 9:26
 */
public class GetControllerToken {

    public static String getToken(Controller controller){
        String token = controller.getPara("token");
        if(StrKit.isBlank(token)){
            token = controller.getHeader("token");
        }
        return token;
    }
}
